Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/store

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/store

TypeScript definitions for store

  • 2.0.5
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61K
decreased by-11.61%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/store

Summary

This package contains type definitions for store (https://github.com/marcuswestin/store.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/store.

index.d.ts

// Cross-browser storage for all use cases, used across the web.

interface StoreJsAPI {
    readonly version: string;
    readonly enabled: boolean;
    get(key: string, optionalDefaultValue?: any): any;
    set(key: string, value: any): any;
    remove(key: string): void;
    each(callback: (val: any, namespacedKey: string) => void): void;
    clearAll(): void;
    hasNamespace(namespace: string): boolean;
    createStore(plugins?: Function[], namespace?: string): StoreJsAPI;
    addPlugin(plugin: Function): void;
    namespace(namespace: string): StoreJsAPI;
}

interface StoreJsEngine {
    createStore(storages: any[], plugins?: any[], namespace?: string): StoreJsAPI;
}

interface StoreJsStorage {
    name: string;
    read: (key: string) => string | null;
    write: (key: string, data: string) => void;
    each: (callback: (val: string, key: string) => any) => void;
    remove: (key: string) => void;
    clearAll: () => void;
}

declare const store: StoreJsAPI;
declare module "store" {
    export = store;
}
declare module "store/dist/store.legacy" {
    export = store;
}
declare module "store/dist/store.legacy.min" {
    export = store;
}
declare module "store/dist/store.modern" {
    export = store;
}
declare module "store/dist/store.modern.min" {
    export = store;
}

declare const engine: StoreJsEngine;
declare module "store/src/store-engine" {
    export = engine;
}
declare module "store/plugins/all" {
    export = Function;
}
declare module "store/plugins/defaults" {
    export = Function;
}
declare module "store/plugins/dump" {
    export = Function;
}
declare module "store/plugins/events" {
    export = Function;
}
declare module "store/plugins/expire" {
    export = Function;
}
declare module "store/plugins/observe" {
    export = Function;
}
declare module "store/plugins/operations" {
    export = Function;
}
declare module "store/plugins/update" {
    export = Function;
}
declare module "store/plugins/v1-backcompat" {
    export = Function;
}

declare const storage: StoreJsStorage;
declare module "store/storages/cookieStorage" {
    export = storage;
}
declare module "store/storages/localStorage" {
    export = storage;
}
declare module "store/storages/memoryStorage" {
    export = storage;
}
declare module "store/storages/oldFF-globalStorage" {
    export = storage;
}
declare module "store/storages/oldIE-userDataStorage" {
    export = storage;
}
declare module "store/storages/sessionStorage" {
    export = storage;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 20:08:00 GMT
  • Dependencies: none

Credits

These definitions were written by Vincent Bortone, harry0000, Roman Nuritdinov (Ky6uk), Johnny Edwards (igl00), and Jason Kwok (JasonHK).

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc